<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PopplerMedia: Poppler Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Poppler Reference Manual">
<link rel="up" href="ch01.html" title="Poppler">
<link rel="prev" href="poppler-Poppler-Layer.html" title="PopplerLayer">
<link rel="next" href="poppler-Poppler-Movie.html" title="PopplerMovie">
<meta name="generator" content="GTK-Doc V1.32.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#poppler-Poppler-Media.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#poppler-Poppler-Media.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="poppler-Poppler-Layer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="poppler-Poppler-Movie.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="poppler-Poppler-Media"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="poppler-Poppler-Media.top_of_page"></a>PopplerMedia</span></h2>
<p>PopplerMedia — Media</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="poppler-Poppler-Media.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="poppler-Poppler-Media.html#PopplerMediaSaveFunc" title="PopplerMediaSaveFunc ()">*PopplerMediaSaveFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="poppler-Poppler-Media.html#poppler-media-get-filename" title="poppler_media_get_filename ()">poppler_media_get_filename</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="poppler-Poppler-Media.html#poppler-media-get-mime-type" title="poppler_media_get_mime_type ()">poppler_media_get_mime_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="poppler-Poppler-Media.html#poppler-media-is-embedded" title="poppler_media_is_embedded ()">poppler_media_is_embedded</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="poppler-Poppler-Media.html#poppler-media-save" title="poppler_media_save ()">poppler_media_save</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="poppler-Poppler-Media.html#poppler-media-save-to-callback" title="poppler_media_save_to_callback ()">poppler_media_save_to_callback</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<a name="PopplerMedia"></a><div class="refsect1">
<a name="poppler-Poppler-Media.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="poppler-Poppler-Media.html#PopplerMedia-struct" title="PopplerMedia">PopplerMedia</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="poppler-Poppler-Media.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">╰──</span> PopplerMedia
</pre>
</div>
<div class="refsect1">
<a name="poppler-Poppler-Media.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;poppler.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="poppler-Poppler-Media.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="poppler-Poppler-Media.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="PopplerMediaSaveFunc"></a><h3>PopplerMediaSaveFunc ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*PopplerMediaSaveFunc<span class="c_punctuation">)</span> (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buf</code></em>,
                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> count</code></em>,
                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Specifies the type of the function passed to
<a class="link" href="poppler-Poppler-Media.html#poppler-media-save-to-callback" title="poppler_media_save_to_callback ()"><code class="function">poppler_media_save_to_callback()</code></a>.  It is called once for each block of
bytes that is "written" by <a class="link" href="poppler-Poppler-Media.html#poppler-media-save-to-callback" title="poppler_media_save_to_callback ()"><code class="function">poppler_media_save_to_callback()</code></a>.  If
successful it should return <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.  If an error occurs it should set
<em class="parameter"><code>error</code></em>
 and return <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, in which case <a class="link" href="poppler-Poppler-Media.html#poppler-media-save-to-callback" title="poppler_media_save_to_callback ()"><code class="function">poppler_media_save_to_callback()</code></a>
will fail with the same error.</p>
<div class="refsect3">
<a name="PopplerMediaSaveFunc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>buffer containing
bytes to be written. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=count][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>count</p></td>
<td class="parameter_description"><p>number of bytes in <em class="parameter"><code>buf</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>user data passed to <a class="link" href="poppler-Poppler-Media.html#poppler-media-save-to-callback" title="poppler_media_save_to_callback ()"><code class="function">poppler_media_save_to_callback()</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>GError to set on error, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="PopplerMediaSaveFunc.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if successful, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> (with <em class="parameter"><code>error</code></em>
set) if failed.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-14.html#api-index-0.14">0.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="poppler-media-get-filename"></a><h3>poppler_media_get_filename ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
poppler_media_get_filename (<em class="parameter"><code><a class="link" href="poppler-Poppler-Media.html#PopplerMedia"><span class="type">PopplerMedia</span></a> *poppler_media</code></em>);</pre>
<p>Returns the media clip filename, in case of non-embedded media. filename might be
a local relative or absolute path or a URI</p>
<div class="refsect3">
<a name="poppler-media-get-filename.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>poppler_media</p></td>
<td class="parameter_description"><p>a <a class="link" href="poppler-Poppler-Media.html#PopplerMedia"><span class="type">PopplerMedia</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="poppler-media-get-filename.returns"></a><h4>Returns</h4>
<p> a filename, return value is owned by <a class="link" href="poppler-Poppler-Media.html#PopplerMedia"><span class="type">PopplerMedia</span></a> and should not be freed</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-14.html#api-index-0.14">0.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="poppler-media-get-mime-type"></a><h3>poppler_media_get_mime_type ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
poppler_media_get_mime_type (<em class="parameter"><code><a class="link" href="poppler-Poppler-Media.html#PopplerMedia"><span class="type">PopplerMedia</span></a> *poppler_media</code></em>);</pre>
<p>Returns the media clip mime-type</p>
<div class="refsect3">
<a name="poppler-media-get-mime-type.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>poppler_media</p></td>
<td class="parameter_description"><p>a <a class="link" href="poppler-Poppler-Media.html#PopplerMedia"><span class="type">PopplerMedia</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="poppler-media-get-mime-type.returns"></a><h4>Returns</h4>
<p> the mime-type, return value is owned by <a class="link" href="poppler-Poppler-Media.html#PopplerMedia"><span class="type">PopplerMedia</span></a> and should not be freed</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-14.html#api-index-0.14">0.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="poppler-media-is-embedded"></a><h3>poppler_media_is_embedded ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
poppler_media_is_embedded (<em class="parameter"><code><a class="link" href="poppler-Poppler-Media.html#PopplerMedia"><span class="type">PopplerMedia</span></a> *poppler_media</code></em>);</pre>
<p>Whether the media clip is embedded in the PDF. If the result is <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the embedded stream
can be saved with <a class="link" href="poppler-Poppler-Media.html#poppler-media-save" title="poppler_media_save ()"><code class="function">poppler_media_save()</code></a> or <a class="link" href="poppler-Poppler-Media.html#poppler-media-save-to-callback" title="poppler_media_save_to_callback ()"><code class="function">poppler_media_save_to_callback()</code></a> function.
If the result is <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, the media clip filename can be retrieved with
<a class="link" href="poppler-Poppler-Media.html#poppler-media-get-filename" title="poppler_media_get_filename ()"><code class="function">poppler_media_get_filename()</code></a> function.</p>
<div class="refsect3">
<a name="poppler-media-is-embedded.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>poppler_media</p></td>
<td class="parameter_description"><p>a <a class="link" href="poppler-Poppler-Media.html#PopplerMedia"><span class="type">PopplerMedia</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="poppler-media-is-embedded.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if media clip is embedded, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-14.html#api-index-0.14">0.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="poppler-media-save"></a><h3>poppler_media_save ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
poppler_media_save (<em class="parameter"><code><a class="link" href="poppler-Poppler-Media.html#PopplerMedia"><span class="type">PopplerMedia</span></a> *poppler_media</code></em>,
                    <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
                    <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Saves embedded stream of <em class="parameter"><code>poppler_media</code></em>
 to a file indicated by <em class="parameter"><code>filename</code></em>
.
If <em class="parameter"><code>error</code></em>
 is set, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be returned.
Possible errors include those in the <a href="../glib/glib-File-Utilities.html#G-FILE-ERROR:CAPS"><span class="type">G_FILE_ERROR</span></a> domain
and whatever the save function generates.</p>
<div class="refsect3">
<a name="poppler-media-save.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>poppler_media</p></td>
<td class="parameter_description"><p>a <a class="link" href="poppler-Poppler-Media.html#PopplerMedia"><span class="type">PopplerMedia</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>name of file to save</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for error, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="poppler-media-save.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, if the file successfully saved</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-14.html#api-index-0.14">0.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="poppler-media-save-to-callback"></a><h3>poppler_media_save_to_callback ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
poppler_media_save_to_callback (<em class="parameter"><code><a class="link" href="poppler-Poppler-Media.html#PopplerMedia"><span class="type">PopplerMedia</span></a> *poppler_media</code></em>,
                                <em class="parameter"><code><a class="link" href="poppler-Poppler-Media.html#PopplerMediaSaveFunc" title="PopplerMediaSaveFunc ()"><span class="type">PopplerMediaSaveFunc</span></a> save_func</code></em>,
                                <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Saves embedded stream of <em class="parameter"><code>poppler_media</code></em>
 by feeding the produced data to <em class="parameter"><code>save_func</code></em>
. Can be used
when you want to store the media clip stream to something other than a file, such as
an in-memory buffer or a socket. If <em class="parameter"><code>error</code></em>
 is set, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be
returned. Possible errors include those in the <a href="../glib/glib-File-Utilities.html#G-FILE-ERROR:CAPS"><span class="type">G_FILE_ERROR</span></a> domain and
whatever the save function generates.</p>
<div class="refsect3">
<a name="poppler-media-save-to-callback.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>poppler_media</p></td>
<td class="parameter_description"><p>a <a class="link" href="poppler-Poppler-Media.html#PopplerMedia"><span class="type">PopplerMedia</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>save_func</p></td>
<td class="parameter_description"><p>a function that is called to save each block of data that the save routine generates. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data to pass to the save function.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for error, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="poppler-media-save-to-callback.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, if the save successfully completed</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-14.html#api-index-0.14">0.14</a></p>
</div>
</div>
<div class="refsect1">
<a name="poppler-Poppler-Media.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="PopplerMedia-struct"></a><h3>PopplerMedia</h3>
<pre class="programlisting">typedef struct _PopplerMedia PopplerMedia;</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32.1</div>
</body>
</html>